#!/bin/bash
echo "🛠️ 正在同步 Gitee Wiki 仓库..."

rm -rf docs/*
mkdir -p docs

if [ ! -d ".gitee_wiki_cache" ]; then
  git clone https://gitee.com/hmk_855_admin/wiki.git .gitee_wiki_cache
else
  cd .gitee_wiki_cache
  git pull
  cd ..
fi

cp -r .gitee_wiki_cache/* docs/

echo "✅ 同步完成，docs/ 目录已更新。"
